#include <string>
#include <vector>
#include <iostream>
using namespace std;
string multiply(string num1, string num2) {
    if (num1 == "0" || num2 == "0") {
        return "0";
    }
    int n = num1.size(), m = num2.size();
    int add = 0;
    vector<int> ret(n + m);
    for (int i = n - 1; i >= 0; --i) {
        int n1 = num1[i] - '0';
        for (int j = m - 1; j >= 0; --j) {
            int n2 = num2[j] - '0';
            int sum = (ret[i + j + 1] + n1 * n2);

            ret[i + j + 1] = sum % 10;
            ret[i + j] += sum / 10;
        }
    }
    string res;
    for (int i = 0; i < ret.size(); ++i) {
        if (i == 0 && ret[i] == 0) {
            continue;
        }
        res += to_string(ret[i]);
    }
    return res;
}
string pow(string x, int n) {
    if (n == 0) {
        return "1";
    }
    string tmp = pow(x, n / 2);
    if (n % 2) {
        return multiply(tmp, multiply(tmp, x));
    }
    return multiply(tmp, tmp);
}
int main() {
    string x = pow(to_string(2), 1000);
    cout << x << endl;
	return 0;
}